<?php


namespace App\Services;

use Catmes\HttpClient\Curl;

class HttpClient
{
    protected $curl;
    protected $bodyRaw;

    public function __construct($url)
    {
        $curl = new Curl($url);
        $this->curl = $curl;
    }

    public function getBody():string{
        $response = $this->curl->getResponse();
        $this->bodyRaw = $response->getBody();
        return $this->bodyRaw;
    }

    public static function get($url):string{
        return Curl::get($url);
    }

}
